package com.ostrich.cloud.ostrichUserWeb.client;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichUserWeb.client.userparam.CusLocationWebParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;



@FeignClient(contextId = "cusWebLocationMangerClient",name="ostrichUserWeb")
@Api("收获地址表")
public interface CusWebLocationMangerClient {

    @PostMapping("uploadLocation")
    @ApiOperation("添加收获地址")
    public Result uploadLocation(@RequestBody  CusLocationWebParam cusLocationWebParam);

    @GetMapping("getAllLocations")
    @ApiOperation("获取用户的收获地址")
    public Result getAllLocations();

    @DeleteMapping("removeCusLocation")
    @ApiOperation("删除收获地址")
    public Result removeCusLocation(@RequestParam("locationId") Integer locationId);

    @PutMapping("putCusLocationState")
    @ApiOperation("修改收获地址的使用状态")
    public Result putCusLocationState(@RequestParam("locationId") Integer locationId,
                                      @RequestParam("status") String status);
}